using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using quanlynhasach.HeThongXuLy;
using quanlynhasach.HeThongLuuTru;

namespace quanlynhasach.HeThongGiaoDien
{
    public partial class frmTimKiemSach : Form
    {
        public frmTimKiemSach()
        {
            InitializeComponent();
        }

        private void btnTim_Click(object sender, EventArgs e)
        {
            SachDTO s = new SachDTO();
            s.TenSach = txtTenSach.Text;
            dgvSach.DataSource = SachDAO.SelectSachLikeName(s);
        }

        private void frmTimKiemSach_Load(object sender, EventArgs e)
        {
            dgvcmbMaTheLoai.ValueMember = "MaTheLoai";
            dgvcmbMaTheLoai.DisplayMember = "TenTheLoai";
            dgvcmbMaTheLoai.DataSource = TheLoaiDAO.GetTheLoaiAll();

        }
    }
}